import request from "@/utils/request"
/*/**
 * @description:文章详情列表接口
 * @param {type} query:查询条件对象,current:当前页码,size:展示几条数据
 * @return: promise
 */
export function ApiGetArticleList(query, current = 1, size = 20) {
  return request({
    url: `/article/article/search`,
    method: 'post',
    data: {
      ...query,
      current,
      size
    }
  })
}
/*/**
 * @description:查询文章详情
 * @param {type} id:文章id
 * @return: promise
 */
export function ApiGetArticleInfo(id) {
  return request({
    url: `/article/article/${id}`,
    method: 'get'
  })
}
/*/**
 * @description: 文章审核通过
 * @param {type} id:文章id
 * @return: promise
 */
export function ApiSuccessAr(id) {
  return request({
    url: `/article/article/audit/success/${id}`,
    method: 'get'
  })
}
/*/**
 * @description: 文章审核不通过
 * @param {type} id:文章id
 * @return: promise
 */
export function ApiFailAr(id) {
  return request({
    url: `/article/article/audit/fail/${id}`,
    method: 'get'
  })
}
/*/**
 * @description: 删除文章
 * @param {type} id:文章id
 * @return: promise
 */
export function ApiDeleteAr(id) {
  return request({
    url: `/article/article/${id}`,
    method: 'delete'
  })
}
